package com.hy.convenient.api.server;

import com.hy.convenient.api.dao.VipDownMapper;
import com.hy.convenient.api.pojo.VipDatePojo;
import com.hy.convenient.api.syb.dao.VipSybaseDownMapper;
import com.hy.convenient.common.VipEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description TODO
 * @className GoodsDownServer
 * @Author hdy
 * @Date 2020-12-23 16:25
 * @Version 1.0
 */
@Service
public class VipDownServer implements ApiServerInterface<VipDatePojo> {
    @Autowired
    public VipSybaseDownMapper vipSyb;
    @Autowired
    public VipDownMapper vip;

    public List<VipDatePojo> queryDownList(Map<String, Object> map) {
        return null;
    }

    /**
     * 查询全部数据总条数
     *
     * @param t
     * @return
     */
    public int queryCount(Map<String, Object> t) {
        return 0;
    }

    @Override
    public List<VipDatePojo> queryUpdateDownList(Map<String, Object> map) {
        return null;
    }

    /**
     * 更具条件查询会员卡 信息
     *
     * @param map
     * @return
     */
    public VipDatePojo queryVip(Map<String, Object> map , VipEnum vipEnum) {
        return vipEnum==VipEnum.BAIHUO? vipSyb.queryVip(map):vip.queryVip(map);
    }

    /**
     * 更具会员卡卡号查询 积分金额等信息
     *
     * @param map
     * @return
     */
    public VipDatePojo queryVipData(Map<String, Object> map , VipEnum vipEnum) {
        return vipEnum==VipEnum.BAIHUO? vipSyb.queryVipData(map):vip.queryVipData(map);
    }
}
